/**
 * Created by ritamashin on 2017/11/2.
 */
import React, {PureComponent} from 'react'
import {Image, StyleSheet} from 'react-native'

class TabBarItem extends PureComponent {

    render() {
        let selectedImage = this.props.selectedImage ? this.props.selectedImage : this.props.normalImage
        return (
            <Image
                source={this.props.focused
                    ? selectedImage
                    : this.props.normalImage}
                style={[styles.item ,{ tintColor: this.props.tintColor, width: 22, height: 22 }]}
            />
        );
    }
}

const styles = StyleSheet.create({
    item :{
        marginBottom : 20,
    }
});

//make this component available to the app
export default TabBarItem;